home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3w / ufmGetCharMetrics.z / ufmGetCharMetrics
Encoding:
Text File  |  1998-10-20  |  9.0 KB  |  133 lines

  1.  
  2.  
  3.  
  4. uuuuffffmmmmGGGGeeeettttCCCChhhhaaaarrrrMMMMeeeettttrrrriiiiccccssss((((3333wwww))))                                    uuuuffffmmmmGGGGeeeettttCCCChhhhaaaarrrrMMMMeeeettttrrrriiiiccccssss((((3333wwww))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _uuuu_ffff_mmmm_GGGG_eeee_tttt_CCCC_hhhh_aaaa_rrrr_MMMM_eeee_tttt_rrrr_iiii_cccc_ssss - get character metrics by character code
  10.  
  11. CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_uuuu_ffff_mmmm_...._hhhh_>>>>
  13.  
  14.      _iiii_nnnn_tttt _uuuu_ffff_mmmm_GGGG_eeee_tttt_CCCC_hhhh_aaaa_rrrr_MMMM_eeee_tttt_rrrr_iiii_cccc_ssss_((((_uuuu_nnnn_ssss_iiii_gggg_nnnn_eeee_dddd _iiii_nnnn_tttt _nnnn_TTTT_yyyy_pppp_eeee_ffff_aaaa_cccc_eeee_HHHH_aaaa_nnnn_dddd_llll_eeee_ssss_,,,,
  15.           _uuuu_nnnn_ssss_iiii_gggg_nnnn_eeee_dddd _iiii_nnnn_tttt _****_tttt_yyyy_pppp_eeee_ffff_aaaa_cccc_eeee_HHHH_aaaa_nnnn_dddd_llll_eeee_ssss_,,,, _iiii_nnnn_tttt _cccc_hhhh_aaaa_rrrr_CCCC_oooo_dddd_eeee_TTTT_yyyy_pppp_eeee_,,,,
  16.           _uuuu_nnnn_ssss_iiii_gggg_nnnn_eeee_dddd _iiii_nnnn_tttt _nnnn_CCCC_hhhh_aaaa_rrrr_CCCC_oooo_dddd_eeee_ssss_,,,, _vvvv_oooo_iiii_dddd _****_cccc_hhhh_aaaa_rrrr_CCCC_oooo_dddd_eeee_ssss_,,,,
  17.           _uuuu_nnnn_ssss_iiii_gggg_nnnn_eeee_dddd _iiii_nnnn_tttt _****_nnnn_CCCC_hhhh_aaaa_rrrr_MMMM_eeee_tttt_rrrr_iiii_cccc_ssss_,,,, _uuuu_ffff_mmmm_CCCC_hhhh_aaaa_rrrr_MMMM_eeee_tttt_rrrr_iiii_cccc_ssss _****_****_cccc_hhhh_aaaa_rrrr_MMMM_eeee_tttt_rrrr_iiii_cccc_ssss_))))
  18.  
  19. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  20.      _uuuu_ffff_mmmm_GGGG_eeee_tttt_CCCC_hhhh_aaaa_rrrr_MMMM_eeee_tttt_rrrr_iiii_cccc_ssss gets the scalable metrics for specified character codes
  21.      from font metric files.  If _uuuu_ffff_mmmm_GGGG_eeee_tttt_CCCC_hhhh_aaaa_rrrr_MMMM_eeee_tttt_rrrr_iiii_cccc_ssss does not find the metrics
  22.      for a specified character code, it returns the metrics for the default
  23.      character.  Set nCharCodes to 0 if you want to get character metrics for
  24.      all characters in a specified typeface.
  25.  
  26.      You can get scalable character metrics only for those typefaces which
  27.      have the flag scalableMetrics set to 1 in their _u_f_m_T_y_p_e_f_a_c_e data
  28.      structures, that is, for those typefaces for which font metric files were
  29.      found.
  30.  
  31.      _n_T_y_p_e_f_a_c_e_H_a_n_d_l_e_s specifies the number of entries (typeface handles) in
  32.      the array _t_y_p_e_f_a_c_e_H_a_n_d_l_e_s.
  33.  
  34.      _t_y_p_e_f_a_c_e_H_a_n_d_l_e_s specifies one or more handles for open typefaces.  Use
  35.      the function _uuuu_ffff_mmmm_OOOO_pppp_eeee_nnnn_TTTT_yyyy_pppp_eeee_ffff_aaaa_cccc_eeee to open a typeface, and get a handle for
  36.      that typeface.
  37.  
  38.      If you specify more than one typeface handle, _uuuu_ffff_mmmm_GGGG_eeee_tttt_CCCC_hhhh_aaaa_rrrr_MMMM_eeee_tttt_rrrr_iiii_cccc_ssss will find
  39.      the font metric files for specified typefaces.  Then it will look for the
  40.      scalable metrics data for a specified character in the font metric file
  41.      for the first specified typeface.  If it does not find that data in that
  42.      file, it will look for that data in the next font metrics file.  It will
  43.      stop looking as soon as it finds the requested character metrics data.
  44.      If it cannot find that data for a specified character, it will return the
  45.      metrics data for the default character.  If _uuuu_ffff_mmmm_GGGG_eeee_tttt_CCCC_hhhh_aaaa_rrrr_MMMM_eeee_tttt_rrrr_iiii_cccc_ssss cannot find
  46.      the metrics data even for the default character, it will return an error
  47.      code.
  48.  
  49.      _c_h_a_r_C_o_d_e_T_y_p_e specifies a 1-byte character code (_U_F_M__B_Y_T_E_1), a Unicode
  50.      UCS-2 code (_U_F_M__U_C_S_2), a Unicode UCS-4 code (_U_F_M__U_C_S_4), a 2-byte
  51.      character code (_U_F_M__B_Y_T_E_2), or a 4-byte character code (_U_F_M__B_Y_T_E_4).
  52.  
  53.      _n_C_h_a_r_C_o_d_e_s specifies the number of elements in the array _c_h_a_r_C_o_d_e_s.  Set
  54.      _n_C_h_a_r_C_o_d_e_s to 0 if you want character metrics data for all characters in
  55.      a specified typeface.  If you want character metrics data for only some
  56.      characters, use the array _c_h_a_r_C_o_d_e_s to specify the character codes of
  57.      those characters.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. uuuuffffmmmmGGGGeeeettttCCCChhhhaaaarrrrMMMMeeeettttrrrriiiiccccssss((((3333wwww))))                                    uuuuffffmmmmGGGGeeeettttCCCChhhhaaaarrrrMMMMeeeettttrrrriiiiccccssss((((3333wwww))))
  71.  
  72.  
  73.  
  74.      _uuuu_ffff_mmmm_GGGG_eeee_tttt_CCCC_hhhh_aaaa_rrrr_MMMM_eeee_tttt_rrrr_iiii_cccc_ssss stores the character metrics data it finds into an
  75.      array of data structures of the type (_u_f_m_C_h_a_r_M_e_t_r_i_c_s).  Then it returns
  76.      the number of entries (_n_C_h_a_r_M_e_t_r_i_c_s) in that array and the address of
  77.      that array (_c_h_a_r_M_e_t_r_i_c_s).
  78.  
  79.      When you are finished with the array (_c_h_a_r_M_e_t_r_i_c_s), you can free it by
  80.      calling _uuuu_ffff_mmmm_FFFF_rrrr_eeee_eeee_CCCC_hhhh_aaaa_rrrr_MMMM_eeee_tttt_rrrr_iiii_cccc_ssss with the argument values that were returned by
  81.      _uuuu_ffff_mmmm_GGGG_eeee_tttt_CCCC_hhhh_aaaa_rrrr_MMMM_eeee_tttt_rrrr_iiii_cccc_ssss.
  82.  
  83.      All scalable metrics values provided by ufmGetCharMetrics are specified
  84.      in ems.  You can scale such values to an appropriate point size by using
  85.      the formula:
  86.  
  87.               scaled value = scalable-value x point-size x resolution / 72.0
  88.  
  89.      You can scale such values to an appropriate pixel size by using the
  90.      formula:
  91.  
  92.               scaled-value = scalable-value x pixel-size
  93.  
  94.      The character advance width in pixels for a given resolution can be
  95.      calculated from the scalable character advance width in ems by using the
  96.      formula:
  97.  
  98.               advance-width = scalable-advance-width x point-size x resolution / 72.0
  99.  
  100.      The result is usually rounded to the nearest pixel.
  101.  
  102. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  103.      ufmFreeCharMetrics(3w), ufmGetCharMetricsByName, ufmOpenTypeface(3w).
  104.  
  105. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  106.      If _uuuu_ffff_mmmm_GGGG_eeee_tttt_CCCC_hhhh_aaaa_rrrr_MMMM_eeee_tttt_rrrr_iiii_cccc_ssss is not able to allocate the memory it needs, it will
  107.      return the value _UUUU_FFFF_MMMM______OOOO_UUUU_TTTT______OOOO_FFFF______MMMM_EEEE_MMMM_OOOO_RRRR_YYYY.  If the values of one or more
  108.      arguments are not valid, _uuuu_ffff_mmmm_GGGG_eeee_tttt_CCCC_hhhh_aaaa_rrrr_MMMM_eeee_tttt_rrrr_iiii_cccc_ssss will return the value
  109.      _UUUU_FFFF_MMMM______IIII_NNNN_VVVV_AAAA_LLLL_IIII_DDDD______VVVV_AAAA_LLLL_UUUU_EEEE.  _UUUU_FFFF_MMMM______OOOO_UUUU_TTTT______OOOO_FFFF______MMMM_EEEE_MMMM_OOOO_RRRR_YYYY and _UUUU_FFFF_MMMM______IIII_NNNN_VVVV_AAAA_LLLL_IIII_DDDD______VVVV_AAAA_LLLL_UUUU_EEEE are defined
  110.      in the header file <_u_f_m._h>.
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.